package types

import (
	"testing"

	"gotest.tools/v3/assert"
)

func TestStringOrFile_Set_FilenameTooLong(t *testing.T) {
	var input = `-----BEGIN CERTIFICATE-----
MIIE8TCCAtmgAwIBAgIRAJK/+Vzvsa3qzsVf3lOq7nAwDQYJKoZIhvcNAQELBQAw
EDEOMAwGA1UEChMFSW5mcmEwHhcNMjIwNjI5MDEyNjA5WhcNMjMwNjI5MDEzMTA5
WjAQMQ4wDAYDVQQKEwVJbmZyYTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
ggIBAM8hcmx6KcQrxKhrEhQldrM81HEdp1/qQfAdMXFKqSKvrR+gGwQO8kPJgkVq
JeuziXUTd0trGt2P0FhfpSwVq+rLuyidDjMcyIXID2HQ6upUpCc1Dsow4RGsXGbU
OQeVNJfCWVTfLtuqScJYQdpzghtVuWMVvsg+UYb722XhlYwGcgIfdeDPatGyRoVN
/CzqC5kl5af0tJIRJ5zPASiQvSIY8+8CGLN8baXP09KTjkHZfMABTa7Htpf71d3H
pk0tLFtzX/P8tPQYDLsJuW/EYYAqN0/YQl+4/wxI5zO5DM+zsErOR6QGiow7sHfh
WYAnY6I8T2DG7aFPa8/K3nRRLNapTgGWuf4gEKK7uPh+WNfYD0+sVaMiE2ZsMswE
aDdM7xlcmjt+/SBMJ9lmk7Ll2vkQiZTE20zMoL/JufTaJlygWZTdLk2T99ccCLBb
+eG56jbmu1xRG+UseqvmaSLTzhOhrVzOCSWw+o0jUfpGO/9DNLkeM++6P9k9vQfo
Sb9qXJCJka+a/CXAAoVjvMHxjFBgY4pzwmgo8K3OiU1BxkWcXFOSMp8cjzT7YhVY
3i1+ZFM4c1MJaTLkufj22yIAd81u+UaW3hMhHGPFsaigGMnazSBFUnAiUvZfgrkX
jJb6bFqlIQJdJIemcVr5cNYD4R0DHNENV+uulyUlwwcfWvE7AgMBAAGjRjBEMA4G
A1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAMBgNVHRMBAf8EAjAA
MA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